<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>:target选择器</title>
    <style type="text/css">
        :target{background-color:#e5eecc;}
    </style>
</head>
<body>
    <h1>这是标题</h1>
    <p><a href="#news1">跳转至内容 1</a></p>
    <p><a href="#news2">跳转至内容 2</a></p>
    <p>请单击上面的超链接，:target选择器会突出显示当前活动的HTML锚。</p>
    <p id="news1"><b>内容 1</b></p>
    <p id="news2"><b>内容 2</b></p>
</body>
</html>
    
    
    
    
    
    